1. Technical Field
The present invention relates to an edge extraction device for extracting a contour or the like of an article from an image. In particular, the present invention relates to an edge extraction device which extracts edges based on length and strength of edges.
2. Background Information
In conventional techniques, various methods for detecting edges in an image have been known. An edge is a portion at which brightness changes sharply in a gray image. In general, the sharp change occurs at a contour of an article, so that the contour of the article can be extracted from the result of edge detection.
The edge detection is performed such that change in brightness values of local pixels are checked and a portion, at which the change is great, is detected as an edge. A representative edge detection method is a method using a differential filter. For example, a Sobel filter, a Laplacian filter, a Prewitt filter, a Roberts filter, or the like is used as the differential filter.
However, these differential filters detect an edge based on only the brightness information, so that a pattern and color change inside an article may also be detected, and it is difficult to detect only the contour which is an outline shape of the article. For example, a method disclosed in Japanese Unexamined Patent Application Publication No. H8-329252 is a method for solving this problem. In the invention disclosed in Japanese Unexamined Patent Application Publication No. H8-329252, an edge direction is estimated, and edge strength is calculated from the estimated edge direction and gradients at respective positions. Thus, a directional characteristic of the edge can be obtained, so that only the edge which forms a contour can be detected.
An edge detection method is disclosed in which it is determined whether or not the detected one is a contour of an article based on length and curvature degree of edge (see, for example, Japanese Unexamined Patent Application Publication No. 2001-177728). In the invention disclosed in Japanese Unexamined Patent Application Publication No. 2001-177728, a short edge and a sharply curved edge are recognized as noise, so that only the contour can be detected.
However, in the above invention of Japanese Unexamined Patent Application Publication No. H8-329252, in order to estimate an edge direction, a cubic spline curve is generated from a group of points on a contour specified by an operator, and it is difficult to detect only the contour of article automatically. A process, in which a cubic spline curve or a spline curve having an order different from it is calculated, is time-consuming.
On the other hand, the above invention of Japanese Unexamined Patent Application Publication No. 2001-177728 does not disclose that a threshold process is performed such that edge strength detected by a differential filter is related to length of edge. Due to this, although the edge strength is great, the edge may not be detected since the length of the edge is short. When the threshold process is performed by using the length and the curvature degree of the edge as an independent parameter, it is difficult to extract a desired edge intuitively, and the operability is deteriorated.